package bairui.international.model.type;

/**
 *
 * (产品订单支付方式)Type_ProductOrderPay
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("产品订单支付方式")
@com.lianjing.sh.processing.info.annotation.InfoComment("产品订单支付方式")
public enum Type_ProductOrderPay implements com.sh_lianjing.standard.EnumCommentable<Type_ProductOrderPay> {

	/**
	 * (在线支付)OnLine</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("在线支付")
	@com.lianjing.sh.processing.info.annotation.InfoComment("在线支付")
	OnLine("在线支付")
,
	/**
	 * (货到付款)Goods</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("货到付款")
	@com.lianjing.sh.processing.info.annotation.InfoComment("货到付款")
	Goods("货到付款")
;

	private static java.util.Map<String, Type_ProductOrderPay> Cache = new java.util.HashMap<>();
	static{
		for(Type_ProductOrderPay enumItem : Type_ProductOrderPay.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_ProductOrderPay(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_ProductOrderPay parseByComment(String comment) {
		return Type_ProductOrderPay.parse(comment);
	}

	public static Type_ProductOrderPay parse(String comment) {
		Type_ProductOrderPay enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_ProductOrderPay.class, comment);
		}
		return enumItem;
	}

}
